API Documentation
Static Public Member Functions | List of all members
nkAstraeus::PbsEnvMapFilter Class Referencefinal

Provides tools to filter environment maps and improve IBL within the PbsMaterial. More...

Static Public Member Functions

static void requestEnvMapFiltering (nkGraphics::Texture *envMap, nkGraphics::Texture *outFilteredMap, unsigned int outPixelDims=128)
 
static void requestIrradianceComputing (Texture *input, Texture *output)
 

Detailed Description

Provides tools to filter environment maps and improve IBL within the PbsMaterial.

Member Function Documentation

◆ requestEnvMapFiltering()

static void nkAstraeus::PbsEnvMapFilter::requestEnvMapFiltering ( nkGraphics::Texture envMap,
nkGraphics::Texture outFilteredMap,
unsigned int  outPixelDims = 128 
)
static

Requests the filtering of an environment map.

This tool accepts cube and 2d environment maps.

For best result, it is advised to provide an environment map with its full mip chain available. The filtering will be able to interpolate better the roughness levels and this will help in reducing noise in the final result, for rough parameters.

Parameters
envMapThe environment map to filter. Can be a cube-map or a spherical environment map.
outFilteredMapThe texture in which to output the result. The texture will be a cube map at the end of the processing.
outPixelDimsThe size, in pixels, of one face of the resulting cube map. The face will be of dimensions outPixelDims x outPixelDims.
Remarks
To ensure result is correct, the envMap needs to be loaded. This method generates pre-filtered environment maps, which can be used within the PbsMaterial. Generated maps correspond to the first element of the split-sum introduced by Epic to simplify IBL. It can be used to improve performances for the material, as it requires a lot less samples than the standard way.

◆ requestIrradianceComputing()

static void nkAstraeus::PbsEnvMapFilter::requestIrradianceComputing ( Texture *  input,
Texture *  output 
)
static

Computes the irradiance map of a texture.

This tool accepts cube and 2d environment maps.

This function will compute the values from the input texture's first mip, using spherical harmonics.

Parameters
inputThe texture from which to compute the irradiance map.
outputThe texture that will receive the irradiance computed.
Remarks
To ensure the result is correct, the input needs to be loaded.

The documentation for this class was generated from the following file: